home *** CD-ROM | disk | FTP | other *** search
/ Champak 40 / Vol 40.iso / games / water_ba.swf / scripts / frame_7 / DoAction.as < prev   
Text File  |  2007-03-20  |  64KB  |  2,334 lines

  1. function ladybug()
  2. {
  3. }
  4. function bird()
  5. {
  6. }
  7. function superz()
  8. {
  9. }
  10. function powerup()
  11. {
  12. }
  13. function tree_class()
  14. {
  15. }
  16. function boards()
  17. {
  18. }
  19. function balloon()
  20. {
  21. }
  22. function star()
  23. {
  24. }
  25. function scrollblock()
  26. {
  27. }
  28. function launchbeez()
  29. {
  30.    if(!_root.hivez)
  31.    {
  32.       beeenter.singleshot("beeenter",true);
  33.       hivearray = [[100,160,320,270,155,450,30,180],[310,200,250,100,230,230,220,120,310]];
  34.       base.attachMovie("hive","hive",11,{_x:hivearray[0][random(8)],_y:hivearray[1][random(8)]});
  35.       _root.hivez = true;
  36.    }
  37. }
  38. function ladybug()
  39. {
  40.    ladyin.singleshot("ladyin",true);
  41.    bugarray = [[10,30,50,70,16,60,30,10],[310,230,320,100,230,230,220,120,310]];
  42.    base.attachMovie("ladybug","ladybug",14,{_x:bugarray[0][random(8)],_y:bugarray[1][random(8)]});
  43. }
  44. function dropsome()
  45. {
  46.    _root.pupint = setInterval(function()
  47.    {
  48.       if(_root.pickedup == true and _root.powerupadded < _root.p_total)
  49.       {
  50.          _root.powerupadded = _root.powerupadded + 1;
  51.          _root.p_num = random(_root.p_array.length);
  52.          mypoZ = random(8);
  53.          pupitup.singleshot("pupitup",true);
  54.          powerup = base.attachMovie("Pup_holder","powerup",9200,{_x:_root.base.poweruparray[0][mypoZ],_y:_root.base.poweruparray[1][mypoZ],i:0});
  55.          base.attachMovie("fountain","fountainz",9800,{_x:base.powerup._x,_y:base.powerup._y - 100});
  56.          powerup.gotoAndStop(_root.p_array[_root.p_num]);
  57.          _root.pickedup = false;
  58.          clearInterval(_root.pupint);
  59.       }
  60.    }
  61.    ,15000);
  62. }
  63. function dropsuper()
  64. {
  65.    _root.supint = setInterval(function()
  66.    {
  67.       mypoZz = random(2);
  68.       myrandz = random(2);
  69.       switch(myrandz)
  70.       {
  71.          case 0:
  72.             base.attachMovie("super1","superp",63,{_x:_root.base.superarray[0][mypoZz],_y:_root.base.superarray[1][mypoZz],i:0});
  73.             break;
  74.          case 1:
  75.             base.attachMovie("super_2","superp",62,{_x:_root.base.superarray[0][mypoZz],_y:_root.base.superarray[1][mypoZz],i:0,tag:2});
  76.             break;
  77.          case 2:
  78.             base.attachMovie("super_1","superp",62,{_x:_root.base.superarray[0][mypoZz],_y:_root.base.superarray[1][mypoZz],i:0,tag:2});
  79.       }
  80.       superup.singleshot("super_up",true);
  81.       clearInterval(_root.supint);
  82.    }
  83.    ,25000);
  84. }
  85. function character()
  86. {
  87. }
  88. function drop()
  89. {
  90.    if(!this.dropfence)
  91.    {
  92.       gozz.singleshot("gozz",true);
  93.       _root.base.enemy1.shutdown = true;
  94.       _root.base.enemy3.shutdown = true;
  95.       arrowz = base.attachMovie("arrow_out","arrow",320,{_x:500,_y:40});
  96.       arrowz.onEnterFrame = function()
  97.       {
  98.          _root.base.shakeit();
  99.          this.arrowdrive(30,10,10,15,10);
  100.       };
  101.       fence2.singleshot("fenceopen",true);
  102.       base.grass.gotoAndStop(2);
  103.       base.fence.gotoAndStop(2);
  104.       base.hitsite.removeMovieClip();
  105.    }
  106.    this.dropfence = true;
  107. }
  108. function opponent()
  109. {
  110.    this.tosscount = 0;
  111.    this.shutdown = false;
  112.    this.bhit = false;
  113. }
  114. function attach()
  115. {
  116.    _root.ammotype = 2;
  117. }
  118. function gametime(onoff)
  119. {
  120.    if(onoff == 1)
  121.    {
  122.       time = setInterval(function()
  123.       {
  124.          _root.fullsecond += 1;
  125.          mainui.ui.timeicon.nextFrame();
  126.          if(!timeinit)
  127.          {
  128.             _root.minute = 0;
  129.             _root.sec = 0;
  130.             timeinit = true;
  131.          }
  132.          _root.z = _root.z + 1;
  133.          if(_root.z < 1)
  134.          {
  135.             _root.sec = "00";
  136.          }
  137.          if(_root.z < 10 and _root.z >= 1)
  138.          {
  139.             _root.sec = ["0" + _root.z];
  140.          }
  141.          if(_root.z >= 10)
  142.          {
  143.             _root.sec = _root.z;
  144.          }
  145.          if(_root.sec > 59)
  146.          {
  147.             _root.sec = "00";
  148.             _root.z = 0;
  149.             _root.minute = _root.minute + 1;
  150.          }
  151.       }
  152.       ,1000);
  153.    }
  154.    if(onoff == 2)
  155.    {
  156.       clearInterval(time);
  157.       _root.z = 0;
  158.    }
  159. }
  160. function compile_score()
  161. {
  162.    myDate = new Date();
  163.    myDate2 = new Date();
  164.    _root.storedtime = myDate.getTime(1);
  165.    _root.storedtime2 = myDate2.getTime(2);
  166.    _root.bonus += _root.critterhit;
  167.    if(_root.fullsecond < 90)
  168.    {
  169.       _root.bonus += 20;
  170.    }
  171.    _root.yourhits = _root.chartag;
  172.    _root.hittally = _root.uitext1 + _root.uitext2 - _root.yoursplash;
  173.    _root.score = _root.prevscore + _root.hittally + _root.bonus + _root.addscore;
  174.    _root.storedtime = _root.storedtime;
  175.    _root.inputext = _root.score;
  176.    loglocalscore();
  177.    my_score = _root.score;
  178.    my_name = _root.postname + _root.storedtime2;
  179. }
  180. function loadUI(lev)
  181. {
  182.    _root.attachMovie("mainui","mainui",10000);
  183.    _root.mainui.gotoAndStop(lev);
  184.    mainui.ui.ui_obj.gotoAndStop(_root.uiobj);
  185.    _root.uitext1 = 0;
  186.    _root.uitext2 = 0;
  187.    _root.minute = 0;
  188. }
  189. function addlevel(current)
  190. {
  191.    switch(current)
  192.    {
  193.       case 1:
  194.          _root.bonus = 0;
  195.          _root.lady = setInterval(ladybug,43000);
  196.          _root.dropsome();
  197.          base.attachMovie("enemypak1","enemy1",7006,{xset:arrayx1,yset:arrayy1,arraydir:arraydir1,_x:489,_y:254,nametext:"enemy1"});
  198.          base.enemy1.hook.attachMovie("handsred","b_unit",1);
  199.          _root.powerupadded = 0;
  200.          crowint.clearInterval();
  201.          crowint = setInterval(function()
  202.          {
  203.             crow.singleshot("crow",true);
  204.             c_dir = Math.randomBetween(120,350);
  205.             _root.attachMovie("bird","bird",10003,{_y:c_dir,adder2:c_dir,originy:c_dir});
  206.          }
  207.          ,30000);
  208.          switch(_root.charchoice)
  209.          {
  210.             case "boy":
  211.                base.attachMovie("boy_c","char1",10001);
  212.                base.char1.hook.attachMovie("handsred","b_unit",1);
  213.                break;
  214.             case "girl":
  215.                base.attachMovie("girl","char1",10001);
  216.                base.char1.hook.attachMovie("handsred","b_unit",1);
  217.                break;
  218.             case "bear":
  219.                base.attachMovie("bear","char1",10001);
  220.                base.char1.hook.attachMovie("handsred","b_unit",1);
  221.          }
  222.          base.char1.waterpressure = 0;
  223.          _root.ammotype = 1;
  224.          _root.superr = true;
  225.          if(_root.intense > 0)
  226.          {
  227.             _root.hop1 = setInterval(function()
  228.             {
  229.                attachhopper(220,1,_root.hop1);
  230.                clearInterval(_root.hop1);
  231.             }
  232.             ,22000);
  233.             _root.hop2 = setInterval(function()
  234.             {
  235.                attachhopper(224,1,_root.hop2);
  236.                clearInterval(_root.hop2);
  237.             }
  238.             ,43000);
  239.          }
  240.          else
  241.          {
  242.             _root.hop1 = setInterval(function()
  243.             {
  244.                attachhopper(220,1,_root.hop1);
  245.                clearInterval(_root.hop1);
  246.             }
  247.             ,22000);
  248.          }
  249.          base.char1.hh = 0;
  250.          base.char1.powerupcounter = 1;
  251.          if(_root.charchoice != "bear")
  252.          {
  253.             base.char1.hook.b_unit.gotoAndStop(1);
  254.          }
  255.          else
  256.          {
  257.             base.char1.hook.b_unit.gotoAndStop(8);
  258.          }
  259.          base.char1._x = 80;
  260.          base.char1._y = 300;
  261.          base.attachMovie("pointer","pointer",3000);
  262.          base.attachMovie("button","button",600);
  263.          _root.powerupnum = 0;
  264.          base.char1.ballooncount = 20;
  265.          base.char1.powerupcounter = 0;
  266.          add_crow();
  267.          base.powerup.num = 0;
  268.          base.dropoz = 0;
  269.          add_powerup();
  270.          dropsuper();
  271.          gametime(1);
  272.          break;
  273.       case 2:
  274.          _root.bonus = 0;
  275.          _root.lady = setInterval(ladybug,43000);
  276.          _root.dropsome();
  277.          _root.beezid = setInterval(launchbeez,20020);
  278.          base.attachMovie("enemypak2","enemy1",7006,{xset:arrayx2,yset:arrayy2,arraydir:arraydir2,_x:489,_y:254,nametext:"enemy1"});
  279.          base.enemy1.hook.attachMovie("handsred","b_unit",1);
  280.          _root.powerupadded = 0;
  281.          crowint.clearInterval();
  282.          crowint = setInterval(function()
  283.          {
  284.             crow.singleshot("crow",true);
  285.             c_dir = Math.randomBetween(120,350);
  286.             _root.attachMovie("bird","bird",10003,{_y:c_dir,adder2:c_dir,originy:c_dir});
  287.          }
  288.          ,30000);
  289.          switch(_root.charchoice)
  290.          {
  291.             case "boy":
  292.                base.attachMovie("boy_c","char1",10001);
  293.                base.char1.hook.attachMovie("handsred","b_unit",1);
  294.                break;
  295.             case "girl":
  296.                base.attachMovie("girl","char1",10001);
  297.                base.char1.hook.attachMovie("handsred","b_unit",1);
  298.                break;
  299.             case "bear":
  300.                base.attachMovie("bear","char1",10001);
  301.                base.char1.hook.attachMovie("handsred","b_unit",1);
  302.                base.char1.hook.b_unit.gotoAndStop(8);
  303.          }
  304.          _root.ammotype = 1;
  305.          _root.superr = true;
  306.          base.char1.hh = 0;
  307.          base.char1.powerupcounter = 1;
  308.          if(_root.charchoice != "bear")
  309.          {
  310.             base.char1.hook.b_unit.gotoAndStop(1);
  311.          }
  312.          else
  313.          {
  314.             base.char1.hook.b_unit.gotoAndStop(8);
  315.          }
  316.          base.char1._x = 80;
  317.          base.char1._y = 300;
  318.          base.attachMovie("pointer","pointer",3000);
  319.          base.attachMovie("button","button",600);
  320.          _root.powerupnum = 0;
  321.          base.char1.ballooncount = 20;
  322.          base.char1.powerupcounter = 0;
  323.          _root.hop1 = setInterval(function()
  324.          {
  325.             attachhopper(220,1);
  326.             clearInterval(_root.hop1);
  327.          }
  328.          ,12000);
  329.          _root.hop2 = setInterval(function()
  330.          {
  331.             attachhopper(224,2);
  332.             clearInterval(_root.hop2);
  333.          }
  334.          ,23000);
  335.          add_crow();
  336.          base.powerup.num = 0;
  337.          base.dropoz = 0;
  338.          add_powerup();
  339.          dropsuper();
  340.          gametime(1);
  341.          break;
  342.       case 3:
  343.          _root.bonus = 0;
  344.          _root.lady = setInterval(ladybug,43000);
  345.          _root.dropsome();
  346.          base.attachMovie("enemypak1","enemy1",7006,{xset:arrayx1,yset:arrayy1,arraydir:arraydir1,_x:489,_y:254,nametext:"enemy1"});
  347.          base.enemy1.hook.attachMovie("handsred","b_unit",1);
  348.          base.attachMovie("enemypak3","enemy3",7007,{xset:arrayx3,yset:arrayy3,arraydir:arraydir3,_x:489,_y:254,nametext:"enemy3"});
  349.          base.enemy3.hook.attachMovie("handsred","b_unit",2);
  350.          base.enemy3.hook.b_unit.gotoAndStop(8);
  351.          _root.powerupadded = 0;
  352.          crowint.clearInterval();
  353.          crowint = setInterval(function()
  354.          {
  355.             crow.singleshot("crow",true);
  356.             c_dir = Math.randomBetween(120,350);
  357.             _root.attachMovie("bird","bird",10003,{_y:c_dir,adder2:c_dir,originy:c_dir});
  358.          }
  359.          ,30000);
  360.          base.enemy3.hook.b_unit.gotoAndStop(8);
  361.          switch(_root.charchoice)
  362.          {
  363.             case "boy":
  364.                base.attachMovie("boy_c","char1",10001);
  365.                base.char1.hook.attachMovie("handsred","b_unit",1);
  366.                break;
  367.             case "girl":
  368.                base.attachMovie("girl","char1",10001);
  369.                base.char1.hook.attachMovie("handsred","b_unit",1);
  370.                break;
  371.             case "bear":
  372.                base.attachMovie("bear","char1",10001);
  373.                base.char1.hook.attachMovie("handsred","b_unit",1);
  374.          }
  375.          _root.ammotype = 1;
  376.          _root.superr = true;
  377.          base.char1.hh = 0;
  378.          base.char1.powerupcounter = 1;
  379.          if(_root.charchoice != "bear")
  380.          {
  381.             base.char1.hook.b_unit.gotoAndStop(1);
  382.          }
  383.          else
  384.          {
  385.             base.char1.hook.b_unit.gotoAndStop(8);
  386.          }
  387.          base.char1._x = 80;
  388.          base.char1._y = 300;
  389.          base.attachMovie("pointer","pointer",3000);
  390.          base.attachMovie("button","button",600);
  391.          _root.powerupnum = 0;
  392.          base.char1.ballooncount = 20;
  393.          base.char1.powerupcounter = 0;
  394.          _root.hop1 = setInterval(function()
  395.          {
  396.             attachhopper(220,2);
  397.             clearInterval(_root.hop1);
  398.          }
  399.          ,20000);
  400.          _root.hop2 = setInterval(function()
  401.          {
  402.             attachhopper(224,2);
  403.             clearInterval(_root.hop2);
  404.          }
  405.          ,33000);
  406.          _root.hop3 = setInterval(function()
  407.          {
  408.             attachhopper(220,1);
  409.             clearInterval(_root.hop3);
  410.          }
  411.          ,42000);
  412.          _root.hop4 = setInterval(function()
  413.          {
  414.             attachhopper(224,2);
  415.             clearInterval(_root.hop4);
  416.          }
  417.          ,23000);
  418.          add_crow();
  419.          base.powerup.num = 0;
  420.          base.dropoz = 0;
  421.          add_powerup();
  422.          dropsuper();
  423.          gametime(1);
  424.    }
  425. }
  426. function grasshoppers()
  427. {
  428. }
  429. function attachhopper(depth, typ)
  430. {
  431.    if(_root._currentframe == 20)
  432.    {
  433.       intvz = input;
  434.       switch(typ)
  435.       {
  436.          case 1:
  437.             hoppercount++;
  438.             xxpoz = Math.randomBetween(10,80);
  439.             yypoz = Math.randomBetween(90,300);
  440.             crickin.singleshot("crickin",true);
  441.             _root.base.attachMovie("hopper","h" + hoppercount++,10050 + hoppercount,{myweight:10,jstrength:70,jdist:1.5,_y:yypoz,_x:xxpoz,originy:yypoz,hatchtime:random(100),name:1,intervalz:input,typ:typ});
  442.             break;
  443.          case 2:
  444.             hoppercount++;
  445.             crickin.singleshot("crickin",true);
  446.             xxpoz = Math.randomBetween(10,80);
  447.             yypoz = Math.randomBetween(90,300);
  448.             _root.base.attachMovie("hopper_f","h" + hoppercount++,10050 + (hoppercount + 20),{myweight:10,jstrength:60,jdist:5,_y:yypoz,_x:xxpoz,originy:yypoz,hatchtime:random(100),name:2,intervalz:input,typ:typ});
  449.       }
  450.       if(hoppercount > 10)
  451.       {
  452.          hoppercount = 0;
  453.       }
  454.    }
  455. }
  456. function doThisAfter(milliseconds, typ)
  457. {
  458.    var id = setInterval(function()
  459.    {
  460.       if(_root._currentframe == 20)
  461.       {
  462.          attachhopper(220,typ);
  463.       }
  464.       clearInterval(id);
  465.       clearInterval(i);
  466.    }
  467.    ,milliseconds);
  468. }
  469. function bee()
  470. {
  471.    this.movearray = [[20,-80,10,40,-100],[50,-70,30,-50,90]];
  472. }
  473. function hive()
  474. {
  475. }
  476. function bobletter()
  477. {
  478.    this.gotoAndStop(bob_array[this.name]);
  479.    counter = 0;
  480.    delay = 300;
  481. }
  482. globalsoundcontrol = new Sound();
  483. _root.holdit = false;
  484. Object.registerClass("balloon0",balloon);
  485. attachMovie("masker","masker",9000000000000);
  486. _root.attachMovie("quitbutton","quitbut",9000000000002,{_x:485,_y:365});
  487. base.char1.ballooncount = 20;
  488. Object.registerClass("enemypak1",opponent);
  489. Object.registerClass("enemypak2",opponent);
  490. Object.registerClass("ladybug",ladybug);
  491. Object.registerClass("enemypak3",opponent);
  492. Object.registerClass("bird",bird);
  493. Object.registerClass("boy_c",character);
  494. Object.registerClass("bear",character);
  495. Object.registerClass("Pup_holder",powerup);
  496. Object.registerClass("star",star);
  497. Object.registerClass("balloon1",balloon);
  498. Object.registerClass("super",balloon);
  499. Object.registerClass("super1",superz);
  500. Object.registerClass("super2",balloon);
  501. Object.registerClass("super_2",superz);
  502. Object.registerClass("balloon2",balloon);
  503. Object.registerClass("board_rules",boards);
  504. Object.registerClass("tallyboard1",boards);
  505. Object.registerClass("board_controls",boards);
  506. Object.registerClass("sorryboard",boards);
  507. Object.registerClass("tallyboard",boards);
  508. Object.registerClass("board_register",boards);
  509. Object.registerClass("char_setup",boards);
  510. Object.registerClass("board_score",boards);
  511. Object.registerClass("scoreboardmain",boards);
  512. Object.registerClass("endround",boards);
  513. Object.registerClass("scrollblock",scrollblock);
  514. Object.registerClass("tree1",tree_class);
  515. Object.registerClass("grass_long",tree_class);
  516. Object.registerClass("picnik",tree_class);
  517. ladybug.prototype = new MovieClip();
  518. superz.prototype = new MovieClip();
  519. tree_class.prototype = new MovieClip();
  520. powerup.prototype = new MovieClip();
  521. bird.prototype = new MovieClip();
  522. boards.prototype = new MovieClip();
  523. balloon.prototype = new MovieClip();
  524. star.prototype = new MovieClip();
  525. scrollblock.prototype = new MovieClip();
  526. boards.prototype.onEnterFrame = function()
  527. {
  528.    if(this.inside.unlock)
  529.    {
  530.       this.direction = 2;
  531.    }
  532.    switch(this.name)
  533.    {
  534.       case "menu":
  535.          this.spinit(2,4,true);
  536.          break;
  537.       case "level1":
  538.          this.spinit(1,8,true);
  539.          break;
  540.       case "level2":
  541.          this.spinit(1,8,true);
  542.          break;
  543.       case "level3":
  544.          this.spinit(1,8,true);
  545.          break;
  546.       case "gameover":
  547.          this.inner.gotoAndStop("level1over");
  548.          this.spinit(1,4,true);
  549.    }
  550. };
  551. _root.pickedup = true;
  552. _quality = "Low";
  553. stop();
  554. initializemouse = true;
  555. Movieclip.prototype.mousemove = function()
  556. {
  557.    if(_root.initializemouse)
  558.    {
  559.       this.xtarget = 240;
  560.       this.ytarget = 200;
  561.       this.xstart = this._x;
  562.       this.ystart = this._y;
  563.       _root.initializemouse = false;
  564.    }
  565.    if(base.hitsite.hitTest(_root._xmouse,_root._ymouse,true))
  566.    {
  567.       this.xtarget = this._x;
  568.       this.ytarget = this._y;
  569.    }
  570.    this.x = Math.abs(this.xstart - this.xtarget);
  571.    this.y = Math.abs(this.ystart - this.ytarget);
  572.    if(this.x > this.y)
  573.    {
  574.       this.xspeed = 3;
  575.       this.yspeed = 3 * (this.y / this.x);
  576.    }
  577.    else
  578.    {
  579.       this.yspeed = 3;
  580.       this.xspeed = 3 * (this.x / this.y);
  581.    }
  582.    this.xtarget + 2;
  583.    if(this._x > 5 || this._x < this.xtarget - 2.5 || this._y > this.ytarget + 2.5 || this._y < this.ytarget - 2.5)
  584.    {
  585.       if(this._x > this.xtarget)
  586.       {
  587.          this._x -= this.xspeed;
  588.       }
  589.       else
  590.       {
  591.          this._x += this.xspeed;
  592.       }
  593.       if(this._x > this.xtarget - 5)
  594.       {
  595.          this.dir = "left";
  596.          this.dirnum = 1;
  597.       }
  598.       if(this._x < this.xtarget + 12)
  599.       {
  600.          this.dir = "right";
  601.          this.dirnum = 2;
  602.       }
  603.       if(this._y > this.ytarget + 3)
  604.       {
  605.          this.dir = "up";
  606.          this.dirnum = 3;
  607.       }
  608.       if(this._y < this.ytarget - 3)
  609.       {
  610.          this.dir = "down";
  611.          this.dirnum = 4;
  612.       }
  613.       if(this._x == this.xtarget)
  614.       {
  615.          this.dir = "center";
  616.          this.dirnum = 5;
  617.       }
  618.       if(this._y > this.ytarget)
  619.       {
  620.          this._y -= this.yspeed;
  621.       }
  622.       else
  623.       {
  624.          this._y += this.yspeed;
  625.       }
  626.    }
  627.    else if(this.firing)
  628.    {
  629.       this.dir = "center";
  630.       this.dirnum = 5;
  631.    }
  632.    this.onMouseDown = function()
  633.    {
  634.       this.xtarget = _root._xmouse;
  635.       this.ytarget = _root._ymouse;
  636.       this.xstart = this._x;
  637.       this.ystart = this._y;
  638.    };
  639. };
  640. Movieclip.prototype.followm = function()
  641. {
  642.    if(this._x - base.char1._x <= 0)
  643.    {
  644.       this.dir = "center";
  645.    }
  646.    this.Xpos = _xmouse;
  647.    this.Ypos = _ymouse;
  648.    this._x = base.char1._x;
  649.    this._y = base.char1._y;
  650.    this.x = this.Xpos - this._x;
  651.    this.y = this.Ypos - this._y;
  652.    this.r = Math.sqrt(this.x * this.x + this.y * this.y);
  653.    this.sinTheta = this.y / this.r;
  654.    this.theta = Math.asin(this.sinTheta);
  655.    if(this.Xpos < this._x)
  656.    {
  657.       this._rotation = 270 - this.theta / 0.0174532925199433;
  658.    }
  659.    else if(this._x < this.Xpos)
  660.    {
  661.       this._rotation = 90 + this.theta / 0.0174532925199433;
  662.    }
  663. };
  664. _root.onMouseUp = function()
  665. {
  666.    base.char1.firing = true;
  667.    base.char1.gotoAndPlay(1);
  668.    base.char1.dir = 5;
  669.    if(base.hitsite.hitTest(_xmouse,_ymouse,true))
  670.    {
  671.       if(Math.floor(base.char1._x - _root._xmouse < 0))
  672.       {
  673.          base.char1.gotoAndStop("right");
  674.       }
  675.       if(Math.floor(base.char1._y - _root._ymouse > 0) and Math.floor(base.char1._x - _root._xmouse > -20))
  676.       {
  677.          base.char1.gotoAndStop("center");
  678.       }
  679.    }
  680.    else
  681.    {
  682.       this.firing = false;
  683.       this.moveme = false;
  684.    }
  685. };
  686. _root.onMouseDown = function()
  687. {
  688.    if(base.hitsite.hitTest(_xmouse,_ymouse,true) and _root.holdit == false and base.char1.ballooncount >= 0)
  689.    {
  690.       base.char1.firing = false;
  691.       this.numm = this.numm + 1;
  692.       if(base.char1.ballooncount < 0)
  693.       {
  694.          this.hit = false;
  695.          base.char1.holdfire = false;
  696.          base.char1.gotoAndStop("centern");
  697.       }
  698.       base.char1.ballooncount--;
  699.       base.char1.dir = "false";
  700.       this.moving = false;
  701.       targ_y = base.pointer._y;
  702.       targ_x = base.pointer._x;
  703.       if(base.char1.ballooncount >= 0)
  704.       {
  705.          blurp.singleshot("blurp",true);
  706.          switch(_root.ammotype)
  707.          {
  708.             case 1:
  709.                this.colorz = random(3);
  710.                attachMovie("balloon" + this.colorz,[1],this.numm + 3000,{_x:targ_x,_y:targ_y,_rotation:base.pointer._rotation,name:base.char1,tag:en,typ:1,colorz:this.colorz});
  711.                break;
  712.             case 2:
  713.                attachMovie("super",[1],this.numm + 3000,{_x:targ_x,_y:targ_y,_rotation:base.pointer._rotation,name:base.char1,tag:"me",typ:2,colorz:"star"});
  714.                break;
  715.             case 3:
  716.                attachMovie("super2",[1],this.numm + 3000,{_x:targ_x,_y:targ_y,_rotation:base.pointer._rotation,name:base.char1,tag:"me",typ:2,colorz:"sun"});
  717.          }
  718.          if(Math.floor(base.char1._x - _root._xmouse < 0))
  719.          {
  720.             base.char1.gotoAndStop("throwright");
  721.          }
  722.          if(Math.floor(base.char1._y - _root._ymouse > 0) and Math.floor(base.char1._x - _root._xmouse > -20))
  723.          {
  724.             base.char1.gotoAndStop("throwup");
  725.          }
  726.       }
  727.    }
  728.    else
  729.    {
  730.       this.moving = true;
  731.    }
  732. };
  733. ladybug.prototype.onEnterFrame = function()
  734. {
  735.    if(!this.init)
  736.    {
  737.       this.cool = false;
  738.       this.init = true;
  739.    }
  740.    this.blinker(30);
  741.    this.lifetimer = this.lifetimer + 1;
  742.    if(this._y == 0)
  743.    {
  744.       this.cool = false;
  745.       delete this.onEnterFrame();
  746.       this.removeMovieClip();
  747.    }
  748.    if(this.lifetimer > 290)
  749.    {
  750.       this.dir = 2;
  751.    }
  752.    else
  753.    {
  754.       this.dir = 1;
  755.    }
  756.    if(this.hitTest(_root.base.char1))
  757.    {
  758.       this.gotoAndPlay("up");
  759.       if(!this.cool)
  760.       {
  761.          this.fly = true;
  762.          this.gotoAndPlay("up");
  763.          cool.singleshot("cool",true);
  764.          if(_root.base.char1.ballooncount <= 0)
  765.          {
  766.             _root.base.char1.ballooncount += 6;
  767.          }
  768.          else
  769.          {
  770.             _root.base.char1.ballooncount += 5;
  771.          }
  772.          this.lifetimer = 360;
  773.          base.char1.attachMovie("ladyx","ladyx",7,{_x:base.char1.hook._x,_y:base.char1.hook._y});
  774.          this.cool = true;
  775.       }
  776.    }
  777.    if(this.lifetimer > 350)
  778.    {
  779.       if(!this.fly)
  780.       {
  781.          ladyout.singleshot("ladyout",true);
  782.          this.gotoAndPlay("up");
  783.          this.fly = true;
  784.       }
  785.       this.up = this.up + 1;
  786.       this._y -= 1 * (this.up / 10);
  787.       this._x += Math.sin(this._y / 5) * 2;
  788.    }
  789.    else if(!this.fly)
  790.    {
  791.       switch(this.dir)
  792.       {
  793.          case 1:
  794.             if(!this.lock)
  795.             {
  796.                this.gotoAndPlay("right");
  797.                this.lock = true;
  798.             }
  799.             this._x += 1;
  800.             break;
  801.          case 2:
  802.             if(!this.lockx)
  803.             {
  804.                this.gotoAndPlay("left");
  805.                this.lockx = true;
  806.             }
  807.             this._x -= 1;
  808.       }
  809.    }
  810. };
  811. superz.prototype.onEnterFrame = function()
  812. {
  813.    if(this.hitTest(_root.base.char1))
  814.    {
  815.       dropsuper();
  816.       _root.holdit = false;
  817.       superbz.singleshot("superbz",true);
  818.       superb.singleshot("superb",true);
  819.       _root.base.char1.hh = 0;
  820.       if(this.tag == 2)
  821.       {
  822.          _root.ammotype = 3;
  823.          base.attachMovie("bsup1","bsupz",10,{_x:this._x - 10,_y:this._y});
  824.          base.char1.hook.b_unit.gotoAndStop(5);
  825.       }
  826.       else
  827.       {
  828.          base.attachMovie("bsup2","bsupz",10,{_x:this._x - 10,_y:this._y});
  829.          base.char1.hook.b_unit.gotoAndStop(2);
  830.          _root.ammotype = 2;
  831.       }
  832.       this.removeMovieClip();
  833.    }
  834.    this.blinker(30);
  835.    this.i = this.i + 1;
  836.    if(this.i > 120 and this.i < 122)
  837.    {
  838.       this.hh = 0;
  839.    }
  840.    if(this.i > 160)
  841.    {
  842.       this.i = 0;
  843.       superout.singleshot("superout",true);
  844.       dropsuper();
  845.       this.removeMovieClip();
  846.    }
  847. };
  848. powerup.prototype.onEnterFrame = function()
  849. {
  850.    if(!this.init)
  851.    {
  852.       this.i = 0;
  853.       this.init = true;
  854.    }
  855.    this.blinker(30);
  856.    this.i = this.i + 1;
  857.    if(this.i > 120 and this.i < 122)
  858.    {
  859.       this.hh = 0;
  860.    }
  861.    if(this.i > 180)
  862.    {
  863.       pupout.singleshot("pupout",true);
  864.       _root.powerupadded--;
  865.       _root.pickedup = true;
  866.       dropsome();
  867.       this.removeMovieClip();
  868.    }
  869.    if(this.hitTest(_root.base.char1))
  870.    {
  871.       base.char1.attachMovie("rings","rings",6,{_x:base.char1.hook._x,_y:base.char1.hook._y});
  872.       base.char1.hh = 0;
  873.       mainui.ui.powerupmeter.gotoAndStop(_root.powerupadded + 1);
  874.       mainui.ui.powerupmeter["p_jar" + _root.powerupadded].gotoAndStop(_root.p_array[_root.p_num]);
  875.       switch(_root.p_array[_root.p_num])
  876.       {
  877.          case "1":
  878.             strawberry.singleshot("strawberry ",true);
  879.             pup2.singleshot("powerup_grabbed",true);
  880.             break;
  881.          case "2":
  882.             icecream.singleshot("icecream ",true);
  883.             pup2.singleshot("powerup_grabbed",true);
  884.             break;
  885.          case "3":
  886.             frenchfries.singleshot("frenchfries",true);
  887.             pup2.singleshot("powerup_grabbed",true);
  888.             break;
  889.          case "4":
  890.             pancake.singleshot("pancake",true);
  891.             pup2.singleshot("powerup_grabbed",true);
  892.             break;
  893.          case "5":
  894.             cookie.singleshot("cookie",true);
  895.             pup2.singleshot("powerup_grabbed",true);
  896.             break;
  897.          case "6":
  898.             tomatoes.singleshot("tomatoes",true);
  899.             pup2.singleshot("powerup_grabbed",true);
  900.             break;
  901.          case "7":
  902.             carrotz.singleshot("carrotz",true);
  903.             pup2.singleshot("powerup_grabbed",true);
  904.             break;
  905.          case "8":
  906.             water.singleshot("watermelon ",true);
  907.             pup2.singleshot("powerup_grabbed",true);
  908.             break;
  909.          case "9":
  910.             pudding.singleshot("pudding",true);
  911.             pup2.singleshot("powerup_grabbed",true);
  912.             break;
  913.          case "10":
  914.             pbj.singleshot("pbj",true);
  915.             pup2.singleshot("powerup_grabbed",true);
  916.             break;
  917.          case "11":
  918.             corn.singleshot("corn",true);
  919.             pup2.singleshot("powerup_grabbed",true);
  920.             break;
  921.          case "12":
  922.             pear.singleshot("pear",true);
  923.             pup2.singleshot("powerup_grabbed",true);
  924.       }
  925.       _root.p_array.splice(_root.p_num,1);
  926.       strawb_in.singleshot("strawb_in",true);
  927.       _root.p_left--;
  928.       _root.pickedup = true;
  929.       this.removeMovieClip();
  930.       clearInterval(_root.pupint);
  931.       dropsome();
  932.    }
  933. };
  934. Object.registerClass("boy_c",character);
  935. Object.registerClass("girl",character);
  936. character.prototype = new MovieClip();
  937. character.prototype.onEnterFrame = function()
  938. {
  939.    if(this.ballooncount < 0)
  940.    {
  941.       _root.balloontick = 0;
  942.       this.balloncount = 0;
  943.    }
  944.    _root.balloontick = int(this.ballooncount);
  945.    _root.yoursplash = _root.op1 + _root.op2;
  946.    if(_root.op1 + _root.op2 >= 5 and this.warningsoundzz != true)
  947.    {
  948.       warningzz.singleshot("warningzz",true);
  949.       this.warningsoundzz = true;
  950.    }
  951.    _root.chartag = _root.uitext1 + _root.uitext2;
  952.    this.blinker(30);
  953.    switch(_root.currentlevel)
  954.    {
  955.       case 1:
  956.          if(_root.p_array.length < 1)
  957.          {
  958.             drop();
  959.          }
  960.          break;
  961.       case 2:
  962.          if(_root.p_array.length < 1)
  963.          {
  964.             drop();
  965.          }
  966.          break;
  967.       case 3:
  968.          if(_root.p_array.length < 1)
  969.          {
  970.             drop();
  971.          }
  972.    }
  973.    if(this.ballooncount > 20)
  974.    {
  975.       this.ballooncount = 20;
  976.    }
  977.    base.pointer.followm();
  978.    if(this._x > 420 and this._y < 200)
  979.    {
  980.       if(!this.leavers)
  981.       {
  982.          if(_root.currentlevel < 3)
  983.          {
  984.             leaver.singleshot("leaver",true);
  985.          }
  986.          else
  987.          {
  988.             winsound.singleshot("winsound",true);
  989.          }
  990.          this.leavers = true;
  991.       }
  992.       base.Pup_holder.removeMovieClip();
  993.       clearInterval(_root.pupint);
  994.       clearInterval(_root.hopint);
  995.       clearInterval(_root.beezid);
  996.       base.superp.removeMovieClip();
  997.       this.removeMovieClip();
  998.       _root.passed = true;
  999.       clearInterval(_root.supint);
  1000.       _root.state = "clear";
  1001.       _root.sticker = 0;
  1002.       _root.holdit = false;
  1003.       base.ladybug.removeMovieClip();
  1004.       clearInterval(_root.lady);
  1005.       _root.state = "clear";
  1006.       clearInterval(_root.hop1);
  1007.       clearInterval(_root.hop2);
  1008.       clearInterval(_root.hop3);
  1009.       clearInterval(_root.hop4);
  1010.       doThisAfter(1);
  1011.       gotoAndPlay(28);
  1012.       this.dropfence = false;
  1013.       base.removeMovieClip();
  1014.       mainui.removeMovieClip();
  1015.    }
  1016.    if(_root.op1 + _root.op2 >= 10 || _root.sticker >= 3)
  1017.    {
  1018.       doThisAfter(1);
  1019.       if(_root.sticker >= 3)
  1020.       {
  1021.          _root.frogsign = true;
  1022.       }
  1023.       _root.holdit = false;
  1024.       _root.sticker = 0;
  1025.       _root.passed = false;
  1026.       base.ladybug.removeMovieClip();
  1027.       clearInterval(_root.lady);
  1028.       base.Pup_holder.removeMovieClip();
  1029.       base.superp.removeMovieClip();
  1030.       _root.state = "clear";
  1031.       clearInterval(_root.hop1);
  1032.       clearInterval(_root.hop2);
  1033.       clearInterval(_root.hop3);
  1034.       clearInterval(_root.hop4);
  1035.       _root.crits = true;
  1036.       _root.gotoAndPlay("clearlevel");
  1037.       clearInterval(_root.lady);
  1038.       clearInterval(_root.supint);
  1039.       this.dropfence = false;
  1040.       _root.base.removeMovieClip();
  1041.       mainui.removeMovieClip();
  1042.    }
  1043.    if(this.hitTest(_level0[0]))
  1044.    {
  1045.       this.randomcry = random(20);
  1046.       if(this.randomcry == 5)
  1047.       {
  1048.          laugh2.singleshot("laugh2",true);
  1049.       }
  1050.       if(this.randomcry == 8)
  1051.       {
  1052.          goodhit.singleshot("goodhit",true);
  1053.       }
  1054.       if(this.randomcry == 18)
  1055.       {
  1056.          longlaugh.singleshot("longlaugh",true);
  1057.       }
  1058.       this.hit = true;
  1059.       base.attachMovie("splasher","splash",240000,{_y:this._y,_x:this._x});
  1060.       base.attachMovie("popper" + _level0[0].colorz,"red",230000,{_y:this._y,_x:this._x});
  1061.       this.gotoAndPlay("hit");
  1062.       _root.score2.singleshot("score2",true);
  1063.       switch(_level0[0].name)
  1064.       {
  1065.          case _level0.base.enemy1:
  1066.             _root.op1 = _root.op1 + 1;
  1067.             this.hitspin = 0;
  1068.             break;
  1069.          case _level0.base.enemy3:
  1070.             _root.op2 = _root.op2 + 1;
  1071.             this.hitspin = 0;
  1072.       }
  1073.       delete _level0[0].onEnterFrame;
  1074.       _level0[0].removeMovieClip();
  1075.    }
  1076.    else if(this.hitspin > 20)
  1077.    {
  1078.       _root.moveme = true;
  1079.       this.hit = false;
  1080.    }
  1081.    else
  1082.    {
  1083.       this.hitspin = this.hitspin + 1;
  1084.    }
  1085.    if(_root.chartag < 0)
  1086.    {
  1087.       _root.chartag = 0;
  1088.    }
  1089.    if(this.hitTest(base.spiket1))
  1090.    {
  1091.       if(_root.charchoice == "bear")
  1092.       {
  1093.          base.char1.hook.b_unit.gotoAndStop(8);
  1094.       }
  1095.       else
  1096.       {
  1097.          base.char1.hook.b_unit.gotoAndStop(1);
  1098.       }
  1099.       if(!this.soundinit)
  1100.       {
  1101.          fill.singleshot("fillup",true);
  1102.          this.soundinit = true;
  1103.       }
  1104.       _root.base.spiket1.gotoAndStop(1);
  1105.       _root.holdit = false;
  1106.       _root.mainui.ui.pressure.gotoAndStop(int(this.waterpressure));
  1107.       if(this.waterpressure > 0)
  1108.       {
  1109.          this.waterpressure -= 0.1;
  1110.          this.ballooncount += 0.1;
  1111.          this.balloncount = Math.floor(this.ballooncount);
  1112.       }
  1113.       _root.ammotype = 1;
  1114.    }
  1115.    else
  1116.    {
  1117.       if(this.waterpressure < 20)
  1118.       {
  1119.          _root.mainui.ui.pressure.gotoAndStop(int(this.waterpressure));
  1120.          this.waterpressure += 0.1;
  1121.          this.waterpl = false;
  1122.       }
  1123.       else
  1124.       {
  1125.          if(!this.waterpl)
  1126.          {
  1127.             _root.base.attachMovie("pipesplash","piper",77000,{_y:base.spiket1._y,_x:base.spiket1._x});
  1128.             waterppp.singleshot("wateron",true);
  1129.             this.waterpl = true;
  1130.          }
  1131.          base.spiket1.play();
  1132.       }
  1133.       this.soundinit = false;
  1134.       this.ballooncount = int(this.ballooncount);
  1135.    }
  1136.    if(this.waterpressure <= 2)
  1137.    {
  1138.       if(!this.waterp)
  1139.       {
  1140.          girgle.singleshot("girgle",true);
  1141.          this.waterp = true;
  1142.       }
  1143.    }
  1144.    else
  1145.    {
  1146.       this.waterp = false;
  1147.    }
  1148.    if(- Math.floor(this._x - _root._xmouse) > 0)
  1149.    {
  1150.       this.dist = - Math.floor(this._x - _root._xmouse);
  1151.    }
  1152.    else
  1153.    {
  1154.       this.dist = Math.floor(this._x - _root._xmouse);
  1155.    }
  1156.    this.adder = int(this.dist / 15);
  1157.    if(- Math.floor(this._y - _root._ymouse) > 0)
  1158.    {
  1159.       this.distY = - Math.floor(this._y - _root._ymouse);
  1160.    }
  1161.    else
  1162.    {
  1163.       this.distY = Math.floor(this._y - _root._ymouse);
  1164.    }
  1165.    this.adder2 = int(this.distY / 12);
  1166.    if(_root.initializemouse)
  1167.    {
  1168.       this.xtarget = 180;
  1169.       this.ytarget = 200;
  1170.       this.xstart = this._x;
  1171.       this.ystart = this._y;
  1172.       _root.initializemouse = false;
  1173.    }
  1174.    if(base.hitsite.hitTest(_root._xmouse,_root._ymouse,true))
  1175.    {
  1176.       this.xtarget = this._x;
  1177.       this.ytarget = this._y;
  1178.    }
  1179.    if(!base.hitTest(_root._xmouse,_root._ymouse,true))
  1180.    {
  1181.       this.xtarget = this._x;
  1182.       this.ytarget = this._y;
  1183.    }
  1184.    this.x = Math.abs(this.xstart - this.xtarget);
  1185.    this.y = Math.abs(this.ystart - this.ytarget);
  1186.    if(this.x > this.y)
  1187.    {
  1188.       this.xspeed = 3;
  1189.       this.yspeed = 3 * (this.y / this.x);
  1190.    }
  1191.    else
  1192.    {
  1193.       this.yspeed = 3;
  1194.       this.xspeed = 3 * (this.x / this.y);
  1195.    }
  1196.    if(this._x > this.xtarget + 2 || this._x < this.xtarget - 2 || this._y > this.ytarget + 2 || this._y < this.ytarget - 2)
  1197.    {
  1198.       if(this._x > this.xtarget)
  1199.       {
  1200.          this._x -= this.xspeed;
  1201.       }
  1202.       else
  1203.       {
  1204.          this._x += this.xspeed;
  1205.       }
  1206.       if(this._x > this.xtarget - 50)
  1207.       {
  1208.          this.dir = "left";
  1209.          this.dirnum = 1;
  1210.       }
  1211.       if(this._x < this.xtarget + 50)
  1212.       {
  1213.          this.dir = "right";
  1214.          this.dirnum = 2;
  1215.       }
  1216.       if(this._y > this.ytarget + 40)
  1217.       {
  1218.          this.dir = "up";
  1219.          this.dirnum = 3;
  1220.       }
  1221.       if(this._y < this.ytarget - 40)
  1222.       {
  1223.          this.dir = "down";
  1224.          this.dirnum = 4;
  1225.       }
  1226.       if(this._y > this.ytarget)
  1227.       {
  1228.          this._y -= this.yspeed;
  1229.       }
  1230.       else
  1231.       {
  1232.          this._y += this.yspeed;
  1233.       }
  1234.    }
  1235.    else
  1236.    {
  1237.       if(this.firing)
  1238.       {
  1239.          this.dir = "center";
  1240.       }
  1241.       this.dirnum = 5;
  1242.    }
  1243.    this.onMouseDown = function()
  1244.    {
  1245.       base.char1.moveme = true;
  1246.       this.xtarget = _root._xmouse;
  1247.       this.ytarget = _root._ymouse;
  1248.       this.xstart = this._x;
  1249.       this.ystart = this._y;
  1250.    };
  1251.    mainui.ui.powerbar.bar.gotoAndPlay(this.adder);
  1252.    if(!mainui.ui.cholder._visible)
  1253.    {
  1254.       with(mainui.ui.fballoon)
  1255.       {
  1256.          blinker(30);
  1257.          if(hh > 30)
  1258.          {
  1259.             hh = 0;
  1260.          }
  1261.       }
  1262.    }
  1263.    if(this.ballooncount < 0)
  1264.    {
  1265.       if(_root.charchoice != "bear")
  1266.       {
  1267.          base.char1.hook.b_unit.gotoAndStop(1);
  1268.       }
  1269.       else
  1270.       {
  1271.          base.char1.hook.b_unit.gotoAndStop(8);
  1272.       }
  1273.       mainui.ui.cholder._visible = false;
  1274.       mainui.ui.getmore._visible = true;
  1275.    }
  1276.    else
  1277.    {
  1278.       mainui.ui.cholder._visible = true;
  1279.       mainui.ui.getmore._visible = false;
  1280.    }
  1281.    this.balloncountz = this.ballooncount;
  1282.    if(!this.hit)
  1283.    {
  1284.       if(this.ballooncount > 0)
  1285.       {
  1286.          switch(this.dir)
  1287.          {
  1288.             case "right":
  1289.                this.gotoAndStop("right");
  1290.                break;
  1291.             case "left":
  1292.                this.gotoAndStop("left");
  1293.                break;
  1294.             case "down":
  1295.                this.gotoAndStop("down");
  1296.                break;
  1297.             case "up":
  1298.                this.gotoAndStop("up");
  1299.                break;
  1300.             case "center":
  1301.                this.gotoAndStop("center");
  1302.          }
  1303.       }
  1304.       else
  1305.       {
  1306.          switch(this.dir)
  1307.          {
  1308.             case "right":
  1309.                this.gotoAndStop("rightn");
  1310.                break;
  1311.             case "left":
  1312.                this.gotoAndStop("leftn");
  1313.                break;
  1314.             case "down":
  1315.                this.gotoAndStop("downn");
  1316.                break;
  1317.             case "up":
  1318.                this.gotoAndStop("upn");
  1319.                break;
  1320.             case "center":
  1321.                this.gotoAndStop("centern");
  1322.          }
  1323.       }
  1324.    }
  1325. };
  1326. opponent.prototype = new MovieClip();
  1327. opponent.prototype.onEnterFrame = function()
  1328. {
  1329.    if(this.hitTest(_level0[1]))
  1330.    {
  1331.       _root.charpoint = _root.charpoint + 1;
  1332.       if(_root.charpoint == 10)
  1333.       {
  1334.          scorepoint.singleshot("pointsz",true);
  1335.          _root.charpoint = 0;
  1336.       }
  1337.       this.randomcry = random(80);
  1338.       switch(this.randomcry)
  1339.       {
  1340.          case 5:
  1341.             cry.singleshot("cry",true);
  1342.             break;
  1343.          case 67:
  1344.             niceone.singleshot("niceone",true);
  1345.             break;
  1346.          case 72:
  1347.             gotcha.singleshot("gotcha",true);
  1348.             break;
  1349.          case 25:
  1350.             cry.singleshot("cry",true);
  1351.             break;
  1352.          case 24:
  1353.             lookout.singleshot("lookout",true);
  1354.             break;
  1355.          case 56:
  1356.             cry.singleshot("cry",true);
  1357.             break;
  1358.          case 18:
  1359.             hehe.singleshot("hehe",true);
  1360.             break;
  1361.          case 22:
  1362.             longestlaugh.singleshot("longestlaugh",true);
  1363.       }
  1364.       this.moveme = false;
  1365.       base.attachMovie("popper" + _level0[1].colorz,"red2",230001,{_y:this._y,_x:this._x});
  1366.       switch(_level0[1].colorz)
  1367.       {
  1368.          case "star":
  1369.             supersplash.singleshot("supersplash",true);
  1370.             base.attachMovie("popper_star","popstar",240002,{_y:this._y,_x:this._x});
  1371.             break;
  1372.          case "sun":
  1373.             supersplash.singleshot("supersplash",true);
  1374.             base.attachMovie("popper_sun","popsun",240003,{_y:this._y,_x:this._x});
  1375.       }
  1376.       base.attachMovie("splasher","splash",240001,{_y:this._y,_x:this._x});
  1377.       this.gotoAndPlay("hit");
  1378.       switch(this.nametext)
  1379.       {
  1380.          case "enemy1":
  1381.             _root.uitext1 += _level0[1].typ;
  1382.             _root.scory.singleshot("score1",true);
  1383.             _level0[1].removeMovieClip();
  1384.             break;
  1385.          case "enemy3":
  1386.             _root.uitext2 += _level0[1].typ;
  1387.             _root.scory.singleshot("score1",true);
  1388.             _level0[1].removeMovieClip();
  1389.       }
  1390.    }
  1391.    this.cx = this._x - base.char1._x;
  1392.    this.cy = this._y / base.char1._y;
  1393.    this.adder = this.cx / 15;
  1394.    if(this.cx < 430 and this.cy < 5 and this.cy > 0.4 and this.shutdown == false)
  1395.    {
  1396.       this.seconds = random(_root.op_throw);
  1397.       if(this.seconds < _root.throwlock)
  1398.       {
  1399.          this.moveme = false;
  1400.          if(this.tosscount < 3)
  1401.          {
  1402.             this.tosscount = this.tosscount + 1;
  1403.             this.fire("left",true,this.adder);
  1404.             this.gotoAndStop("throwleft");
  1405.          }
  1406.       }
  1407.       else if(this.hit == false and this.moveme == true)
  1408.       {
  1409.          this.gotoAndStop("center");
  1410.          this.tosscount = 0;
  1411.          this.fire("left",false);
  1412.       }
  1413.    }
  1414.    if(this.cy < 500 and this.cx < 120 and this.shutdown == false)
  1415.    {
  1416.       this.seconds = random(_root.op_throw);
  1417.       if(this.seconds < _root.throwlock)
  1418.       {
  1419.          this.moveme = false;
  1420.          if(this.tosscount < 3)
  1421.          {
  1422.             this.tosscount = this.tosscount + 1;
  1423.             this.fire("down",true,this.adder);
  1424.             this.gotoAndStop("throwdown");
  1425.          }
  1426.       }
  1427.       else if(this.hit == false and this.moveme == true)
  1428.       {
  1429.          this.gotoAndStop("center");
  1430.          this.fire("up",false);
  1431.          this.tosscount = 0;
  1432.       }
  1433.    }
  1434.    if(!this.hit)
  1435.    {
  1436.       this.arr = arr;
  1437.       if(this.xx <= this.xset.length and this.edir == 1)
  1438.       {
  1439.          this.xx = this.xx + 1;
  1440.          this.forwards = true;
  1441.          this._x = this.xset[this.xx];
  1442.          this._y = this.yset[this.xx];
  1443.       }
  1444.       else
  1445.       {
  1446.          this.edir = 2;
  1447.       }
  1448.       if(this.xx > 0 and this.edir == 2)
  1449.       {
  1450.          this.xx--;
  1451.          this.forwards = false;
  1452.          this._x = this.xset[this.xx];
  1453.          this._y = this.yset[this.xx];
  1454.       }
  1455.       else
  1456.       {
  1457.          this.edir = 1;
  1458.       }
  1459.       if(this.moveme)
  1460.       {
  1461.          if(this.forwards)
  1462.          {
  1463.             switch(this.arraydir[this.xx])
  1464.             {
  1465.                case 3:
  1466.                   this.gotoAndStop("up");
  1467.                   break;
  1468.                case 4:
  1469.                   this.gotoAndStop("down");
  1470.                   break;
  1471.                case 2:
  1472.                   this.gotoAndStop("right");
  1473.                   break;
  1474.                case 1:
  1475.                   this.gotoAndStop("left");
  1476.                   break;
  1477.                case 5:
  1478.                   this.gotoAndStop("center");
  1479.             }
  1480.          }
  1481.          else
  1482.          {
  1483.             switch(this.arraydir[this.xx])
  1484.             {
  1485.                case 3:
  1486.                   this.gotoAndStop("down");
  1487.                   break;
  1488.                case 4:
  1489.                   this.gotoAndStop("up");
  1490.                   break;
  1491.                case 2:
  1492.                   this.gotoAndStop("left");
  1493.                   break;
  1494.                case 1:
  1495.                   this.gotoAndStop("right");
  1496.                   break;
  1497.                case 5:
  1498.                   this.gotoAndStop("center");
  1499.             }
  1500.          }
  1501.       }
  1502.    }
  1503. };
  1504. bird.prototype.onEnterFrame = function()
  1505. {
  1506.    this._x += 2.5;
  1507.    if(this.hitTest(base.char1))
  1508.    {
  1509.       if(!this.sound)
  1510.       {
  1511.          crowattack.singleshot("crowattack",true);
  1512.          this.sound = true;
  1513.       }
  1514.       if(base.char1.ballooncount > 5)
  1515.       {
  1516.          base.char1.ballooncount--;
  1517.       }
  1518.       this.gotoAndPlay(11);
  1519.    }
  1520.    if(!this.init1)
  1521.    {
  1522.       this.originx = this._x;
  1523.       this.init1 = true;
  1524.    }
  1525.    this.birdwobbler(3,34.5,50,15,10);
  1526.    if(this._x > 630)
  1527.    {
  1528.       if(!returning)
  1529.       {
  1530.          delete this.onEnterFrame;
  1531.          this.removeMovieClip();
  1532.       }
  1533.       else
  1534.       {
  1535.          this._x = this.originx - 20;
  1536.       }
  1537.    }
  1538. };
  1539. Math.randomBetween = function(a, b)
  1540. {
  1541.    return a + Math.floor(Math.random() * (b - a + 1));
  1542. };
  1543. movieclip.prototype.wobbler1 = function(tempo, dim, ddim, alpha, dalpha, adder, adder2)
  1544. {
  1545.    this.originy = adder2;
  1546.    this._y = this.originy + adder + dim + ddim * Math.sin(this.i * 3.141592653589793 / 180);
  1547.    this.i += tempo;
  1548.    if(this.i >= 360)
  1549.    {
  1550.       this.i = 0;
  1551.    }
  1552. };
  1553. movieclip.prototype.birdwobbler = function(tempo, dim, ddim, alpha, dalpha)
  1554. {
  1555.    this._y = this.originy + dim + ddim * Math.sin(this.i * 3.141592653589793 / 180);
  1556.    this.i += tempo;
  1557.    if(this.i >= 360)
  1558.    {
  1559.       this.i = 0;
  1560.    }
  1561. };
  1562. Movieclip.prototype.blinker = function(setblink)
  1563. {
  1564.    if(!this.colorinit)
  1565.    {
  1566.       this.hh = 0;
  1567.       this.s = [0,255,0,255,0,255,0,255,0,255,0,255];
  1568.       this.c = new Color(this);
  1569.       this.colorinit = true;
  1570.    }
  1571.    if(this.hh < this.s.length)
  1572.    {
  1573.       this.hh = this.hh + 1;
  1574.       this.c.setBrightOffset(this.s[this.hh]);
  1575.    }
  1576. };
  1577. Color.prototype.setBrightOffset = function(offset)
  1578. {
  1579.    if(!this.blinkinit)
  1580.    {
  1581.       this.hh = 0;
  1582.       this.blinkinit = true;
  1583.    }
  1584.    this.trans = new Object();
  1585.    this.trans.rb = this.trans.gb = this.trans.bb = offset;
  1586.    this.setTransform(this.trans);
  1587. };
  1588. Color.prototype.setTint = function(r, g, b, amount)
  1589. {
  1590.    var percent = 100 - amount;
  1591.    var trans = new Object();
  1592.    trans.ra = trans.ga = trans.ba = percent;
  1593.    var ratio = amount / 100;
  1594.    trans.rb = r * ratio;
  1595.    trans.gb = g * ratio;
  1596.    trans.bb = b * ratio;
  1597.    this.setTransform(trans);
  1598. };
  1599. Movieclip.prototype.spinit = function(method, seconds, removeit, mytarg)
  1600. {
  1601.    if(!this.spininit)
  1602.    {
  1603.       this._alpha = 0;
  1604.       this.inside._xscale = 0;
  1605.       this.inside._yscale = 0;
  1606.       this.direction = 1;
  1607.       this.spininit = true;
  1608.    }
  1609.    if(this.inside._xscale < 100 and this.direction != 2)
  1610.    {
  1611.       this.inside._rotation += 72;
  1612.       this._alpha += 10;
  1613.       this.inside._xscale += 10;
  1614.       this.inside._yscale += 10;
  1615.       this.t1 = this.t1 + 1;
  1616.    }
  1617.    switch(method)
  1618.    {
  1619.       case 1:
  1620.          if(this.inside._xscale >= 100)
  1621.          {
  1622.             if(!this.soundz)
  1623.             {
  1624.                readyz.singleshot("readyz",true);
  1625.                this.soundz = true;
  1626.             }
  1627.             if(this.spintimer > seconds * 10 and this.spintimer < seconds * 20)
  1628.             {
  1629.                if(!this.sound2)
  1630.                {
  1631.                   setter.singleshot("setter",true);
  1632.                   this.sound2 = true;
  1633.                }
  1634.                this.inside.ready.gotoAndStop(2);
  1635.             }
  1636.             if(this.spintimer > seconds * 20)
  1637.             {
  1638.                if(!this.sound3)
  1639.                {
  1640.                   go.singleshot("go",true);
  1641.                   this.sound3 = true;
  1642.                }
  1643.                this.inside.ready.gotoAndStop(3);
  1644.             }
  1645.             if(this.spintimer >= seconds * 30)
  1646.             {
  1647.                this.direction = 2;
  1648.             }
  1649.             else
  1650.             {
  1651.                this.spintimer = this.spintimer + 1;
  1652.             }
  1653.          }
  1654.          break;
  1655.       case 2:
  1656.    }
  1657.    if(this.direction != 1)
  1658.    {
  1659.       _root.menu.prototype.locked = false;
  1660.       this.inside._rotation -= 72;
  1661.       this._alpha -= 5;
  1662.       this.inside._xscale -= 5;
  1663.       this.inside._yscale -= 5;
  1664.       this.t1--;
  1665.       if(this._alpha <= 1)
  1666.       {
  1667.          switch(this.name)
  1668.          {
  1669.             case "level1":
  1670.                addlevel(1);
  1671.                break;
  1672.             case "level2":
  1673.                addlevel(2);
  1674.                break;
  1675.             case "level3":
  1676.                addlevel(3);
  1677.          }
  1678.          if(this.tag == "end")
  1679.          {
  1680.             _root.gotoAndStop("intro");
  1681.          }
  1682.          menu.currentup = false;
  1683.          delete this.onEnterFrame;
  1684.          delete this.inside.ready.onEnterFrame;
  1685.          this.removeMovieClip();
  1686.       }
  1687.    }
  1688. };
  1689. _root.powerupnum = 0;
  1690. this.count = 0;
  1691. while(this.count < 5)
  1692. {
  1693.    _root["uitext" + this.count] = 0;
  1694.    this.count = this.count + 1;
  1695. }
  1696. Movieclip.prototype.stardrive = function()
  1697. {
  1698.    this._y -= 0.3;
  1699.    this._x = Math.sin(this._y);
  1700. };
  1701. this.edir == 1;
  1702. Movieclip.prototype.gravity = function(death, adder)
  1703. {
  1704.    this.adder = adder;
  1705.    if(!this.initg)
  1706.    {
  1707.       this.originy = this._y;
  1708.       this.initg = true;
  1709.    }
  1710.    if(this._y > this.originy + death)
  1711.    {
  1712.       this.nextFrame();
  1713.    }
  1714.    this._y += this.vy;
  1715.    this.vy += (45 - this.adder) / 20;
  1716.    this.vx /= 1.02;
  1717. };
  1718. shock = new Sound();
  1719. gozz = new Sound();
  1720. frog = new Sound();
  1721. namenter = new Sound();
  1722. hopout = new Sound();
  1723. pupout = new Sound();
  1724. superout = new Sound();
  1725. balloonsound = new Sound();
  1726. crickin = new Sound();
  1727. beeleave = new Sound();
  1728. girgle = new Sound();
  1729. waterppp = new Sound();
  1730. blurp = new Sound();
  1731. ladyin = new Sound();
  1732. ladyout = new Sound();
  1733. cool = new Sound();
  1734. fill = new Sound();
  1735. score = new Sound();
  1736. crow = new Sound();
  1737. enter = new Sound();
  1738. pup2 = new Sound();
  1739. fence2 = new Sound();
  1740. strawb_in = new Sound();
  1741. strawb_out = new Sound();
  1742. bossa2 = new Sound();
  1743. bossa = new Sound();
  1744. titlemain = new Sound();
  1745. readyz = new Sound();
  1746. setter = new Sound();
  1747. go = new Sound();
  1748. set("get",new Sound());
  1749. superb = new Sound();
  1750. cry = new Sound();
  1751. energy = new Sound();
  1752. titlez = new Sound();
  1753. ohno = new Sound();
  1754. nextlevel = new Sound();
  1755. sorry = new Sound();
  1756. corn = new Sound();
  1757. laugh2 = new Sound();
  1758. highscore = new Sound();
  1759. finish = new Sound();
  1760. pancake = new Sound();
  1761. pudding = new Sound();
  1762. pear = new Sound();
  1763. niceone = new Sound();
  1764. bossa3 = new Sound();
  1765. ticky = new Sound();
  1766. rollover1 = new Sound();
  1767. down = new Sound();
  1768. rollover_in = new Sound();
  1769. gotcha = new Sound();
  1770. intensez = new Sound();
  1771. choose = new Sound();
  1772. readie = new Sound();
  1773. scory = new Sound();
  1774. score2 = new Sound();
  1775. carrotz = new Sound();
  1776. cookie = new Sound();
  1777. frenchfries = new Sound();
  1778. icecream = new Sound();
  1779. pbj = new Sound();
  1780. strawberry = new Sound();
  1781. tomatoes = new Sound();
  1782. water = new Sound();
  1783. yuck = new Sound();
  1784. djoe = new Sound();
  1785. csero = new Sound();
  1786. laughz = new Sound();
  1787. frogz = new Sound();
  1788. superbz = new Sound();
  1789. goodhit = new Sound();
  1790. lookout = new Sound();
  1791. longlaugh = new Sound();
  1792. hehe = new Sound();
  1793. pupitup = new Sound();
  1794. longestlaugh = new Sound();
  1795. beesoundz = new Sound();
  1796. splash = new Sound();
  1797. superup = new Sound();
  1798. warning = new Sound();
  1799. supersplash = new Sound();
  1800. scorepoint = new Sound();
  1801. crowattack = new Sound();
  1802. beeenter = new Sound();
  1803. leaver = new Sound();
  1804. scorefin = new Sound();
  1805. warningzz = new Sound();
  1806. winsound = new Sound();
  1807. jumpy = new Sound();
  1808. Sound.prototype.singleshot = function(id)
  1809. {
  1810.    this.attachSound(id);
  1811.    this.start();
  1812. };
  1813. Sound.prototype.looper = function(id)
  1814. {
  1815.    this.attachSound(id);
  1816.    this.setVolume = 60;
  1817.    this.start(0,500000);
  1818. };
  1819. _root.removed = true;
  1820. Movieclip.prototype.shakeit = function()
  1821. {
  1822.    if(!this.init)
  1823.    {
  1824.       s = 0;
  1825.       this.originx = this._x;
  1826.       this.originy = this._y;
  1827.       this.init = true;
  1828.    }
  1829.    if(this.s < 10)
  1830.    {
  1831.       base._x = random(6);
  1832.       base._y = random(6);
  1833.       this.s = this.s + 1;
  1834.    }
  1835.    else
  1836.    {
  1837.       base._x = this.originx;
  1838.       base._y = this.originy;
  1839.    }
  1840. };
  1841. opponent.prototype.fire = function(Fdir, Foff, adder)
  1842. {
  1843.    if(this.shutdown == false and Foff == true)
  1844.    {
  1845.       this.i = this.i + 1;
  1846.       blurp.singleshot("blurp",true);
  1847.       this.colorz = random(3);
  1848.       attachMovie("balloon" + this.colorz,[0],this.i + 1,{Fdir:Fdir,adder:adder,who:2,_x:this._x,_y:this._y,name:this,tag:en,colorz:this.colorz});
  1849.    }
  1850. };
  1851. balloon.prototype.onEnterFrame = function()
  1852. {
  1853.    if(_root.ammotype == 2 and this.tag == "me")
  1854.    {
  1855.       this.droplettimer = this.droplettimer + 1;
  1856.       if(this.droplettimer > 2)
  1857.       {
  1858.          this.tackon = this.tackon + 1;
  1859.          base.attachMovie("droplet","droplet" + this.tackon,400000 + this.tackon,{_x:this._x,_y:this._y});
  1860.          this.droplettimer = 0;
  1861.       }
  1862.    }
  1863.    if(_root.ammotype == 3 and this.tag == "me")
  1864.    {
  1865.       this.droplettimer = this.droplettimer + 1;
  1866.       if(this.droplettimer > 2)
  1867.       {
  1868.          this.tackon = this.tackon + 1;
  1869.          base.attachMovie("droplet2","droplet" + this.tackon,400000 + this.tackon,{_x:this._x,_y:this._y});
  1870.          this.droplettimer = 0;
  1871.       }
  1872.    }
  1873.    if(_root.currentlevel > 3 || _root.intense > 12)
  1874.    {
  1875.       this.pthrower = 200;
  1876.    }
  1877.    else
  1878.    {
  1879.       this.pthrower = 50;
  1880.    }
  1881.    if(this.who == 2)
  1882.    {
  1883.       switch(this.fdir)
  1884.       {
  1885.          case "up":
  1886.             this._y -= 20;
  1887.             this.gravity(200,this.adder);
  1888.             this._rotation += 8;
  1889.             break;
  1890.          case "down":
  1891.             this._y += 12;
  1892.             this.gravity(200,this.adder);
  1893.             this._rotation += 8;
  1894.             break;
  1895.          case "right":
  1896.             this._x += 12;
  1897.             this._y -= 12;
  1898.             this.gravity(this.pthrower,this.adder);
  1899.             this._rotation += 8;
  1900.             break;
  1901.          case "left":
  1902.             this._x -= 12;
  1903.             this._y -= 12;
  1904.             this.gravity(this.pthrower,this.adder);
  1905.             this._rotation += 8;
  1906.       }
  1907.    }
  1908.    else
  1909.    {
  1910.       this.inner._rotation += 20;
  1911.       this._y -= Math.cos(0.0174532925199433 * this._rotation) * base.char1.adder2 + 15;
  1912.       this._x += Math.sin(0.0174532925199433 * this._rotation) * base.char1.adder;
  1913.       this.gravity();
  1914.    }
  1915. };
  1916. tree_class.prototype.onEnterFrame = function()
  1917. {
  1918.    if(this.hitTest(base.char1))
  1919.    {
  1920.       if(base.char1._y - base.char1._height / 2 < this._y - this._height / 3)
  1921.       {
  1922.          this.swapDepths(20001);
  1923.       }
  1924.       else
  1925.       {
  1926.          this.swapDepths(801);
  1927.       }
  1928.    }
  1929.    if(this.hitTest(base.enemy1))
  1930.    {
  1931.       if(base.enemy1._y - base.enemy1._height / 2 < this._y - this._height / 3)
  1932.       {
  1933.          this.swapDepths(20002);
  1934.       }
  1935.       else
  1936.       {
  1937.          this.swapDepths(802);
  1938.       }
  1939.    }
  1940.    if(this.hitTest(base.enemy2))
  1941.    {
  1942.       if(base.enemy2._y - base.enemy2._height / 2 < this._y - this._height / 3)
  1943.       {
  1944.          this.swapDepths(20003);
  1945.       }
  1946.       else
  1947.       {
  1948.          this.swapDepths(803);
  1949.       }
  1950.    }
  1951.    if(this.hitTest(base.enemy3))
  1952.    {
  1953.       if(base.enemy3._y - base.enemy3._height / 2 < this._y - this._height / 3)
  1954.       {
  1955.          this.swapDepths(20004);
  1956.       }
  1957.       else
  1958.       {
  1959.          this.swapDepths(804);
  1960.       }
  1961.    }
  1962.    if(this.hitTest(_root.base[4]))
  1963.    {
  1964.       if(_root.base[4]._y - _root.base[4]._height / 2 < this._y - this._height / 3)
  1965.       {
  1966.          this.swapDepths(20000);
  1967.       }
  1968.       else
  1969.       {
  1970.          this.base[4].swapDepths(805);
  1971.       }
  1972.    }
  1973. };
  1974. movieclip.prototype.arrowdrive = function(tempo, dim, ddim, alpha, dalpha, adder)
  1975. {
  1976.    if(!this.init)
  1977.    {
  1978.       this.originx = this._x;
  1979.       this.init = true;
  1980.    }
  1981.    this.force = this.originx + adder + dim + ddim * Math.sin(this.i * 36 / 180);
  1982.    this._x = this.force;
  1983.    this.i += tempo;
  1984.    if(this.i >= 360)
  1985.    {
  1986.       this.i = 0;
  1987.    }
  1988. };
  1989. _root.loglocalscore();
  1990. Date.prototype.oldDay = Date.prototype.getDay;
  1991. Date.prototype.oldMonth = Date.prototype.getMonth;
  1992. Date.prototype.oldSeconds = Date.prototype.getSeconds;
  1993. Date.prototype.oldMinutes = Date.prototype.getMinutes;
  1994. Date.prototype.oldHours = Date.prototype.getHours;
  1995. Date.prototype.oldTime = Date.prototype.getTime;
  1996. Date.prototype.getSeconds = function()
  1997. {
  1998.    var secs = this.oldSeconds();
  1999.    secs >= 10 ? null : (secs = "0" + secs);
  2000.    return secs;
  2001. };
  2002. Date.prototype.getMinutes = function()
  2003. {
  2004.    var mins = this.oldMinutes();
  2005.    mins >= 10 ? null : (mins = "0" + mins);
  2006.    return mins;
  2007. };
  2008. Date.prototype.getHours = function()
  2009. {
  2010.    var cHour = this.oldHours();
  2011.    if(cHour < 12)
  2012.    {
  2013.       this.morning = " AM";
  2014.       return cHour;
  2015.    }
  2016.    this.morning = " PM";
  2017.    return cHour - 12;
  2018. };
  2019. Date.prototype.getTime = function(format)
  2020. {
  2021.    if(arguments.length > 0)
  2022.    {
  2023.       if(format == 0)
  2024.       {
  2025.          return this.getDay() + " " + this.getDate() + " of " + this.getMonth() + " " + this.getFullYear();
  2026.       }
  2027.       if(format == 1)
  2028.       {
  2029.          return this.getHours() + ":" + this.getMinutes() + this.morning + "/" + (this.getMonth() + 1) + "/" + this.getDate() + "/" + this.getFullYear();
  2030.       }
  2031.       if(format == 2)
  2032.       {
  2033.          return this.getMonth() + 1 + "/" + this.getDate() + "/" + this.getFullYear();
  2034.       }
  2035.       if(format == 3)
  2036.       {
  2037.          return this.toString();
  2038.       }
  2039.    }
  2040.    return this.oldTime();
  2041. };
  2042. myDate = new Date();
  2043. Object.registerClass("hopper",grasshoppers);
  2044. Object.registerClass("hopper_f",grasshoppers);
  2045. grasshoppers.prototype = new MovieClip();
  2046. grasshoppers.prototype.onEnterFrame = function()
  2047. {
  2048.    if(_root._currentframe != 20)
  2049.    {
  2050.       doThisAfter(1);
  2051.       this.removeMovieClip();
  2052.       delete this.onEnterFrame;
  2053.    }
  2054.    if(this.hitTest(_level0[1]))
  2055.    {
  2056.       base.attachMovie("grex","grex2",240001,{_y:this._y,_x:this._x});
  2057.       frog.singleshot("frog",true);
  2058.       _root.critterhit += 5;
  2059.       doThisAfter(Math.randomBetween(_root.hopperin,40000),this.typ);
  2060.       this.removeMovieClip();
  2061.       delete this.onEnterFrame;
  2062.    }
  2063.    if(this.hitTest(_root.base.char1))
  2064.    {
  2065.       base.attachMovie("grex","grexz",240002,{_y:this._y,_x:this._x});
  2066.       _root.sticker = _root.sticker + 1;
  2067.       frogz.singleshot("frogz",true);
  2068.       yuck.singleshot("yuck",true);
  2069.       _root.hoppercurrent = false;
  2070.       switch(this.name)
  2071.       {
  2072.          case 1:
  2073.             doThisAfter(Math.randomBetween(_root.hopperin,40000),this.typ);
  2074.             this.removeMovieClip();
  2075.             delete this.onEnterFrame;
  2076.             base.char1.hook.b_unit.gotoAndStop(3);
  2077.             _root.holdit = true;
  2078.             break;
  2079.          case 2:
  2080.             base.char1.hook.b_unit.gotoAndStop(4);
  2081.             _root.holdit = true;
  2082.             doThisAfter(Math.randomBetween(_root.hopperin,40000),this.typ);
  2083.             this.removeMovieClip();
  2084.             delete this.onEnterFrame;
  2085.       }
  2086.       _root.ammotype = 0;
  2087.    }
  2088.    if(this.hatchtimer > 20)
  2089.    {
  2090.       this.power += 2;
  2091.       this.count = this.count + 1;
  2092.       this.dirtime = this.jstrength * this.myweight / 2;
  2093.       if(this.count > this.dirtime * 2 || _root._currentframe > 21)
  2094.       {
  2095.          doThisAfter(Math.randomBetween(_root.hopperin,40000),this.typ);
  2096.          this.removeMovieClip();
  2097.          delete this.onEnterFrame;
  2098.          hopout.singleshot("hopout",true);
  2099.          _root.hoppercurrent = false;
  2100.       }
  2101.       if(this.count > this.dirtime)
  2102.       {
  2103.          this.dir = 2;
  2104.       }
  2105.       else
  2106.       {
  2107.          this.dir = 1;
  2108.       }
  2109.       if(this.lock)
  2110.       {
  2111.          switch(this.dir)
  2112.          {
  2113.             case 1:
  2114.                this._x += this.jdist;
  2115.                this.point = "right";
  2116.                break;
  2117.             case 2:
  2118.                this._x -= this.jdist;
  2119.                this.point = "left";
  2120.          }
  2121.          this._y = this.wave;
  2122.       }
  2123.       this.wave = Math.sin(this.power / this.myweight) * this.jstrength + this.originy;
  2124.       if(this.wave < this.originy)
  2125.       {
  2126.          this.lock = true;
  2127.          this.inner.gotoAndStop(this.point);
  2128.          if(!this.jumpsound)
  2129.          {
  2130.             jumpy.singleshot("jumpy",true);
  2131.             this.jumpsound = true;
  2132.          }
  2133.          this.inner.jj.gotoAndStop(2);
  2134.       }
  2135.       else
  2136.       {
  2137.          this.inner.gotoAndStop(this.point);
  2138.          if(this.name == 2)
  2139.          {
  2140.             if(this.hitTest(_root.base.grass.river))
  2141.             {
  2142.                this.inner.jj.gotoAndStop(5);
  2143.                this.jumpsound = false;
  2144.             }
  2145.             if(!this.hitTest(_root.base.grass.river))
  2146.             {
  2147.                this.inner.jj.gotoAndStop(1);
  2148.                this.jumpsound = false;
  2149.             }
  2150.          }
  2151.          else
  2152.          {
  2153.             this.jumpsound = false;
  2154.             this.inner.jj.gotoAndStop(1);
  2155.          }
  2156.          this.lock = false;
  2157.       }
  2158.    }
  2159.    else
  2160.    {
  2161.       this.hatchtimer = this.hatchtimer + 1;
  2162.    }
  2163. };
  2164. Object.registerClass("bee",bee);
  2165. bee.prototype = new MovieClip();
  2166. Object.registerClass("hive",hive);
  2167. bee.prototype = new MovieClip();
  2168. hive.prototype = new MovieClip();
  2169. hive.prototype.onEnterFrame = function()
  2170. {
  2171.    this.blinker(30);
  2172.    this.t = this.t + 1;
  2173.    if(this.t > 1000)
  2174.    {
  2175.       beeleave.singleshot("beeleave",true);
  2176.       clearInterval(_root.beezid);
  2177.       _root.beezid = setInterval(launchbeez,20020);
  2178.       this.removeMovieClip();
  2179.    }
  2180.    if(this.hitTest(_root.base.char1) || this.hitTest(_level[1]) || this.hitTest(_level[0]))
  2181.    {
  2182.       if(!this.sounder)
  2183.       {
  2184.          ohno.singleshot("ohno",true);
  2185.          beesoundz.singleshot("beezzz",true);
  2186.          this.sounder = true;
  2187.       }
  2188.       clearInterval(_root.beezid);
  2189.       _root.hivez = false;
  2190.       bee.prototype.enemy = _root.base.char1;
  2191.       this.beetimer = this.beetimer + 1;
  2192.       if(this.beetimer > 5 and this.beecount < 7)
  2193.       {
  2194.          this.beecount = this.beecount + 1;
  2195.          this.beetimer = 0;
  2196.          _root.base.attachMovie("bee","bee",80000 + this.beecount,{_x:this._x,_y:this._y - 20,lifetime:Math.randomBetween(10,30)});
  2197.       }
  2198.    }
  2199.    if(this.hitTest(_root.base.enemy1))
  2200.    {
  2201.       if(!this.sounder)
  2202.       {
  2203.          ohno.singleshot("ohno",true);
  2204.          beesoundz.singleshot("beezzz",true);
  2205.          this.sounder = true;
  2206.       }
  2207.       clearInterval(_root.beezid);
  2208.       _root.hivez = false;
  2209.       bee.prototype.enemy = _root.base.enemy1;
  2210.       this.beetimer = this.beetimer + 1;
  2211.       if(this.beetimer > 5 and this.beecount < 7)
  2212.       {
  2213.          this.beecount = this.beecount + 1;
  2214.          this.beetimer = 0;
  2215.          _root.base.attachMovie("bee","bee",80000 + this.beecount,{_x:this._x,_y:this._y - 20,lifetime:Math.randomBetween(10,30)});
  2216.       }
  2217.    }
  2218. };
  2219. bee.prototype.onEnterFrame = function()
  2220. {
  2221.    if(this.hitTest(_root.base.char1))
  2222.    {
  2223.       if(_root.base.char1.ballooncount > 0)
  2224.       {
  2225.          _root.base.char1.ballooncount--;
  2226.       }
  2227.    }
  2228.    if(this._x < this.enemy)
  2229.    {
  2230.       this.gotoAndStop("right");
  2231.    }
  2232.    else
  2233.    {
  2234.       this.gotoAndStop("left");
  2235.    }
  2236.    this.k = this.k + 1;
  2237.    if(this.lifemeter > this.lifetime)
  2238.    {
  2239.       this.removeMovieClip();
  2240.    }
  2241.    if(this.k > 20)
  2242.    {
  2243.       this.lifemeter = this.lifemeter + 1;
  2244.       this.timer = random(5);
  2245.       this.k = 0;
  2246.    }
  2247.    this.floatTo(0.2,this.movearray[0][this.timer] + this.enemy._x,this.movearray[1][this.timer] + this.enemy._y - 70);
  2248. };
  2249. bee.prototype.beemove = function()
  2250. {
  2251. };
  2252. MovieClip.prototype.floatTo = function(s, x, y)
  2253. {
  2254.    this._x += Math.round(x - this._x) * s * s;
  2255.    this._y += Math.round(y - this._y) * s * s;
  2256. };
  2257. titlemain.looper("bossa");
  2258. Object.registerClass("bobletter",bobletter);
  2259. bobletter.prototype = new MovieClip();
  2260. bobletter.prototype.startbob = function(bobcount, targetz, xpoz, ypoz)
  2261. {
  2262.    b_count = bobcount;
  2263.    bob_array = ["c","h","a","r","a","c","t","e","r","-","s","e","t","-","u","p"];
  2264.    b_count = bob_array.length;
  2265.    targetz.createEmptyMovieClip("holder",5);
  2266.    bobl = 0;
  2267.    while(bobl < bob_array.length)
  2268.    {
  2269.       boblocy = 60;
  2270.       boblocx = 60;
  2271.       targetz.holder.attachMovie("bobletter",[l],bobl + 20,{_y:boblocy,_x:boblocx * bobl / 4,name:bobl,originy:boblocy,stage:1});
  2272.       targetz.holder._x = -116;
  2273.       targetz.holder._y = -145;
  2274.       bobl++;
  2275.    }
  2276. };
  2277. bobletter.prototype.onEnterFrame = function()
  2278. {
  2279.    if(!this.init)
  2280.    {
  2281.       dir = 1;
  2282.       counterz = 0;
  2283.       this.init = true;
  2284.    }
  2285.    if(counterz >= b_count)
  2286.    {
  2287.       if(tickz > delay)
  2288.       {
  2289.          dir = 2;
  2290.          tickz = 0;
  2291.          counterz--;
  2292.       }
  2293.       else
  2294.       {
  2295.          tickz++;
  2296.       }
  2297.    }
  2298.    if(counterz <= -1 and dir == 2)
  2299.    {
  2300.       if(tickz > delay)
  2301.       {
  2302.          dir = 1;
  2303.          tick = 0;
  2304.          counterz = 0;
  2305.       }
  2306.       else
  2307.       {
  2308.          tickz++;
  2309.       }
  2310.    }
  2311.    if(this.name == counterz and dir == 1)
  2312.    {
  2313.       if(this._y < this.originy + 8)
  2314.       {
  2315.          this._y += 1 + (this._y - this.originy) / 3;
  2316.       }
  2317.       else
  2318.       {
  2319.          counterz += 1;
  2320.       }
  2321.    }
  2322.    if(this.name == counterz and dir == 2)
  2323.    {
  2324.       if(this._y > this.originy)
  2325.       {
  2326.          this._y -= 4;
  2327.       }
  2328.       else
  2329.       {
  2330.          counterz -= 1;
  2331.       }
  2332.    }
  2333. };
  2334.